Component({
  /**
   * 组件的属性列表
   */
  options: {
    addGlobalClass: true,
  },
  properties: {
    goodsData: {
      type:Array,
      value:[]
    },
    decoration: {
      type:null
    },
    love: {
      type:null,
    },
    point: {
      type:null,
    }
  },
  lifetimes: {
    attached: function() {
      // 在组件实例进入页面节点树时执行
      // let List = this.data.discountList;
      // let marketingList = List.filter(item=>this.data.decoration['discount_list'].some(ele=>ele === item)); //筛选出显示的tab数组
      // console.log(marketingList);
      this.setData({
        discountList:this.data.decoration['discount_list']
      })
      console.log(this.data.discountList.includes('1'));

    },
  },
  
  /**
   * 组件的初始数据
   */
  data: {
    discountList:[]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    goodsNav(event) {
      const goodsId = event.currentTarget.dataset.goodsid;
      wx.navigateTo({
        url: `/packageF/consumption/goodsDetails/goodsDetails?goodsId=${goodsId}`
      })
    }
  }
})
